Regroup all multiswebench hyperparameters in constants.py#369
Closed
simonrosenberg wants to merge 3 commits intomainfrom
Closed
Regroup all multiswebench hyperparameters in constants.py#369simonrosenberg wants to merge 3 commits intomainfrom
simonrosenberg wants to merge 3 commits intomainfrom
Conversation
This commit creates a single source of truth for all Multi-SWE-Bench constant values and hyperparameters by: 1. Creating benchmarks/multiswebench/constants.py with all constants: - Dataset configuration (DEFAULT_DATASET, DEFAULT_SPLIT, DEFAULT_LANGUAGE, etc.) - Docker/Image configuration (DEFAULT_DOCKER_IMAGE_PREFIX, DEFAULT_BUILD_TARGET, etc.) - Runtime configuration (DEFAULT_RUNTIME_API_URL, DEFAULT_STARTUP_TIMEOUT, etc.) - Evaluation configuration (DEFAULT_EVAL_MODE, DEFAULT_MAX_WORKERS, etc.) - Path configuration (DATASET_CACHE_DIR, DEFAULT_WORKING_DIR, etc.) - Environment variable names for all configurable values 2. Updating all multiswebench modules to import from constants.py: - build_images.py - download_dataset.py - eval_infer.py - run_infer.py - scripts/data/data_change.py - scripts/eval/update_multi_swe_bench_config.py 3. Adding comprehensive tests in tests/test_multiswebench_constants.py Fixes #366 Co-authored-by: openhands <openhands@all-hands.dev>
…taset.py - Removed tests/test_multiswebench_constants.py - Reverted benchmarks/multiswebench/scripts/data/data_change.py to original - Reverted benchmarks/multiswebench/download_dataset.py to original - Removed DEFAULT_VERSION and DATASET_CACHE_DIR from constants.py Co-authored-by: openhands <openhands@all-hands.dev>
Replace individual constants (DEFAULT_EVAL_MODE, DEFAULT_FORCE_BUILD, etc.) with a single DEFAULT_EVAL_HARNESS_CONFIG dictionary that serves as a template for the Multi-SWE-Bench evaluation harness configuration. This is cleaner because: - All config values are used together in one place - The complete config structure is visible at a glance - Single import instead of 10 individual imports - Easier to maintain Co-authored-by: openhands <openhands@all-hands.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR creates a single source of truth for all Multi-SWE-Bench constant values and hyperparameters by introducing
benchmarks/multiswebench/constants.py.Fixes #366
Changes
1. Created
benchmarks/multiswebench/constants.pyA new module containing all constant values organized into logical categories:
DEFAULT_DATASET,DEFAULT_SPLIT,DEFAULT_LANGUAGE,DEFAULT_MODEL_NAME,DEFAULT_VERSIONDEFAULT_DOCKER_IMAGE_PREFIX,DEFAULT_BUILD_TARGET, and environment variable namesDEFAULT_RUNTIME_API_URL,DEFAULT_STARTUP_TIMEOUT, boolean defaults, and environment variable namesDEFAULT_EVAL_MODE,DEFAULT_MAX_WORKERS,DEFAULT_LOG_LEVEL,FIX_PATCH_RUN_CMD, etc.DATASET_CACHE_DIR,DEFAULT_WORKING_DIRDEFAULT_ENV_SETUP_COMMANDS2. Updated all multiswebench modules to import from constants.py
build_images.pydownload_dataset.pyeval_infer.pyrun_infer.pyscripts/data/data_change.pyscripts/eval/update_multi_swe_bench_config.py3. Added comprehensive tests
Created
tests/test_multiswebench_constants.pywith 28 tests covering:Testing
All 28 new tests pass:
Existing tests continue to pass:
Benefits
@simonrosenberg can click here to continue refining the PR